import 'package:plugin_platform_interface/plugin_platform_interface.dart';

import 'df_ronda_printer_method_channel.dart';

abstract class DfRondaPrinterPlatform extends PlatformInterface {
  /// Constructs a DfRondaPrinterPlatform.
  DfRondaPrinterPlatform() : super(token: _token);

  static final Object _token = Object();

  static DfRondaPrinterPlatform _instance = MethodChannelDfRondaPrinter();

  /// The default instance of [DfRondaPrinterPlatform] to use.
  ///
  /// Defaults to [MethodChannelDfRondaPrinter].
  static DfRondaPrinterPlatform get instance => _instance;

  /// Platform-specific implementations should set this with their own
  /// platform-specific class that extends [DfRondaPrinterPlatform] when
  /// they register themselves.
  static set instance(DfRondaPrinterPlatform instance) {
    PlatformInterface.verifyToken(instance, _token);
    _instance = instance;
  }

  Future<String?> getPlatformVersion() {
    throw UnimplementedError('platformVersion() has not been implemented.');
  }

  Future<String> connectDevice(String printAddr) {
    throw UnimplementedError('connect() has not been implemented.');
  }

  Future<String> closeDevice() {
    throw UnimplementedError('closeDevice() has not been implemented.');
  }

  Future<void> printAscii(String printString) async {
    throw UnimplementedError('printAscii() has not been implemented.');
  }
}
